﻿using DataSync.CommonLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataSync.Proc.CustParse
{
    class DESEncryptCustParse :ICustParse
    {
        public void Init(System.Xml.Linq.XElement xmlnode)
        {
            
        }

        public string Parse(string curValue, object[] rowValues, string custParams, Entity.CustParseExtData extParams)
        {
            if (string.IsNullOrEmpty(curValue) || string.IsNullOrEmpty(custParams))
            {
                return curValue;
            }
            string NewValue = curValue;
            string key = custParams;
            NewValue= DES.Encrypt(curValue, key);
            return NewValue;
        }
    }
}
